package com.example.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;

public class MainActivity2 extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
    }

    public void show(View view) {
        EditText s=findViewById(R.id.message);
        String s1=s.getText().toString();
        Toast.makeText(this, s1, Toast.LENGTH_SHORT).show();
    }
}